#include "tablewidget.h"
#include "ui_tablewidget.h"

TableWidget::TableWidget(const QString &sql, const VMSV &datas, const QStringList &headers, QWidget *parent) :
    QWidget(parent),
    ui(new Ui::TableWidget)
{
    ui->setupUi(this);
    m_sql = sql;
    m_model = new TableModel(this);
    m_model->setHeaders(headers);
    m_model->setModelDatas(datas);
    ui->tableView->setModel(m_model);
}

TableWidget::~TableWidget()
{
    delete ui;
}
